﻿namespace MyCompany.MyProject.Common;

/// <summary>
/// 记录AOP日志
/// </summary>
public class AOPLogInfo
{
    /// <summary>
    /// 请求时间
    /// </summary>
    public string RequestTime { get; set; } = string.Empty;

    /// <summary>
    /// 操作人员
    /// </summary>
    public string OpUserName { get; set; } = string.Empty ;

    /// <summary>
    /// 请求方法名
    /// </summary>
    public string RequestMethodName { get; set; } = string.Empty;

    /// <summary>
    /// 请求参数名
    /// </summary>
    public string RequestParamsName {  get; set; } = string.Empty ;

    /// <summary>
    /// 请求数据JSON
    /// </summary>
    public string RequestParamsData { get; set; } = string.Empty;

    /// <summary>
    /// 请求响应间隔时间
    /// </summary>
    public string ResponseIntervalTime { get; set; } = string.Empty;

    /// <summary>
    /// 响应时间
    /// </summary>
    public string ResponseTime { get; set; } = string.Empty;

    /// <summary>
    /// 响应结果
    /// </summary>
    public string ResponseJsonData { get; set; }= string.Empty;
}

/// <summary>
/// Aop 异常日志类
/// </summary>
public class AOPLogExInfo
{
    /// <summary>
    /// 记录的日志信息
    /// </summary>
    public AOPLogInfo? AOPLogInfo { get; set; }

    /// <summary>
    /// 内部异常信息
    /// </summary>
    public string InnerException { get; set; } = string.Empty;

    /// <summary>
    /// 异常消息
    /// </summary>
    public string ExMessage { get; set; } = string.Empty;
}

/// <summary>
/// 请求日志信息
/// </summary>
public class RequestLogInfo
{
    /// <summary>
    /// 请求路径
    /// </summary>
    public string? Path { get; set; }

    /// <summary>
    /// 请求 Body 参数
    /// </summary>
    public string? BodyData { get; set; }

    /// <summary>
    /// 请求参数
    /// </summary>
    public string? QueryString { get; set; }
}

